<cfset  curdir = getDirectoryFromPath(getCurrentTemplatePath()) />
<cffile action="read" file="#curdir#multiple.ics" variable="data" />

<cfset ical = createObject("component","actionpacks.apputils.model.ical.ical").init(data)>
<cfset results = ical.getEvents()>

<cfloop index="x" from="1" to="#arraylen(results)#">

	<cfset eventData = results[x]>

	<cfoutput>
		<!--- 
	<cfif not structKeyExists(eventData,"summary")>
		<h2>Unnamed Event</h2>
	<cfelse>
		<h2>#eventData.summary.data#</h2>
	</cfif>
	<cfset startDate = ical.icalParseDateTime(eventData.dtstart.data)>
	<cfif structKeyExists(eventData,"dtend")>
		<cfset endDate = ical.icalParseDateTime(eventData.dtend.data)>
	<cfelseif structKeyExists(eventData,"duration") and eventData.duration.data is not "P1D">
		<cfset endDate = ical.icalParseDuration(eventData.duration.data,startdate)>
	<cfelse>
		<cfset enddate = startdate>
	</cfif>
	#dateFormat(startDate,"mm/dd/yy")# #timeformat(startDate,"h:mm:ss")#<cfif dateFormat(startDate,"mm/dd/yy") neq dateFormat(endDate,"mm/dd/yy")> - #dateFormat(endDate,"mm/dd/yy")#</cfif><br>
	<cfif structKeyExists(eventData,"description")>#eventData.description.data#</cfif>
		--->
	<cfdump var="#eventData#">
	<p/>
	<hr>
	</cfoutput>

</cfloop>
